import RulesMixin from '@/components/mixins/FormValidateRulesMixin'
const mixin = {
  mixins: [RulesMixin],
  methods: {
    back() {
      this.$emit('toggleModel', 'view')
    },
    save() {
      throw Error('未实现方法')
    },
    reset() {
      this.form = Object.assign({}, this.original)
      this.errorMsg = ''
    }
  },
  data() {
    return {
      active: false,
      dirty: false,
      title: '新增',
      errorMsg: '',
      original: {}
    }
  }
}

export default mixin